package com.cmower.baeldung.arrays1;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

public class ToListDemo {
    public static void main(String[] args) {
int[] anArray = new int[] {1, 2, 3, 4, 5};

List<Integer> aList = new ArrayList<>();
for (int element : anArray) {
    aList.add(element);
}

        new ArrayList<>(Arrays.asList(anArray));

    }
}
